<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>markdown预览</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
	href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
<script
	src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
<script
	src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
<link rel="stylesheet"
	href="http://static.runoob.com/assets/foundation-icons/foundation-icons.css">
<link rel="stylesheet" href="/css/common.css">
<link rel="stylesheet"
	href="https://cdn.bootcss.com/github-markdown-css/3.0.1/github-markdown.css">

<script
	src="https://cdn.bootcdn.net/ajax/libs/marked/1.1.0/marked.min.js"></script>
</head>
<body>
	<div id="app" class="container">
		<br />
		<h4 class="">博客详情</h4>
		<hr class="" />
		<div class="card" style="margin-top: 1em;">
			<div class="card-header">
				<h5 class="text-info" v-text="title"></h5>
			</div>
			<div class="card-body markdown-body" v-html="detail"></div>
			<div class="card-footer" align="right">
				<span class="fi-eye large blank"></span>10<span
					class="fi-heart large blank"></span>5<span class="blank pointer">赞</span>
			</div>
		</div>
	</div>
</body>



<script src="https://cdn.bootcss.com/vue/2.6.11/vue.js"></script>
<script src="https://cdn.bootcss.com/axios/0.19.1/axios.min.js"></script>
<script>
		new Vue({
			el: "#app",
			data: function() {
				return {
					title: '',
					articleId : null,
					detail: ''
				}
			},
			mounted(){
				/* this.title = sessionStorage.getItem("title")
				this.articleId = sessionStorage.getItem("articleId") */
				this.getMd()
			},
			methods: {
				getMd() {
					axios.get("/js/jvm.md").then(reponse => {
						this.detail = marked(reponse.data)
					}).catch(error => {
						alert("获取数据失败" + error)
					})
				},
			}
		})
	</script>

</html>
